package com.alinesno.cloud.monitor.agent.aspect;

import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;

/**
 * 获取异常信息
 * @author WeiXiaoJin
 * @since 2020年1月24日 下午8:26:29
 */
@Aspect
public class ServiceErrorAspect extends BaseAspect {
	
    @AfterThrowing(pointcut="@within(org.springframework.stereotype.Service)" , throwing = "ex")
    public void logAfterThrowingAllMethods(Exception ex) throws Throwable { 
    	log.error("异常信息:{}" , ex); 
    }
}